package xyz.jangle.thread2;

public class Test {

	public static void main(String[] args) {
		
		Thread thread = new Thread(()-> {
			System.out.println("111");
		}); 
		thread.start();
		
		Thread[] threads = new Thread[10];
		for (int i = 0; i < threads.length; i++) {
			threads[i] = new Thread(()->{
				System.out.println("123");
			});
		}
		for (int i = 0; i < threads.length; i++) {
			threads[i].start();
		}
		for (int i = 0; i < threads.length; i++) {
			try {
				threads[i].join();
			} catch (InterruptedException e) {
				e.printStackTrace();
			}
		}

	}

}
